<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-JAVA: awtk.TRect类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-JAVA
   </div>
   <div id="projectbrief">AWTK JAVA API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>awtk</b></li><li class="navelem"><a class="el" href="classawtk_1_1_t_rect.html">TRect</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="classawtk_1_1_t_rect-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">awtk.TRect类 参考</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a10477d0d8aefdf6d01c38317160f90c5"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_rect.html#a10477d0d8aefdf6d01c38317160f90c5">TRect</a> (long <a class="el" href="classawtk_1_1_t_rect.html#a2f977d55dae6bb815b6d3f1648985f30">nativeObj</a>)</td></tr>
<tr class="separator:a10477d0d8aefdf6d01c38317160f90c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ed6e46363a1d47d4e6e43c2dc84deb6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classawtk_1_1_t_rect.html">TRect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_rect.html#a0ed6e46363a1d47d4e6e43c2dc84deb6">set</a> (int x, int y, int w, int h)</td></tr>
<tr class="separator:a0ed6e46363a1d47d4e6e43c2dc84deb6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b5f66742ee5238240be71f67db3cce8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_rect.html#a7b5f66742ee5238240be71f67db3cce8">destroy</a> ()</td></tr>
<tr class="separator:a7b5f66742ee5238240be71f67db3cce8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa797b41268e6a41762c89cdab0917258"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_rect.html#aa797b41268e6a41762c89cdab0917258">getX</a> ()</td></tr>
<tr class="separator:aa797b41268e6a41762c89cdab0917258"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae914521d02bf4f4635bb110922b8c01c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_rect.html#ae914521d02bf4f4635bb110922b8c01c">getY</a> ()</td></tr>
<tr class="separator:ae914521d02bf4f4635bb110922b8c01c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae97865527d842d6a0b7bbd64afed9cca"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_rect.html#ae97865527d842d6a0b7bbd64afed9cca">getW</a> ()</td></tr>
<tr class="separator:ae97865527d842d6a0b7bbd64afed9cca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c44ec80ee106bcf1bc38a9b23b35a2b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_rect.html#a5c44ec80ee106bcf1bc38a9b23b35a2b">getH</a> ()</td></tr>
<tr class="separator:a5c44ec80ee106bcf1bc38a9b23b35a2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a5baf4adf4d4d75e9b29cbe9087b333f6"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classawtk_1_1_t_rect.html">TRect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_rect.html#a5baf4adf4d4d75e9b29cbe9087b333f6">cast</a> (long <a class="el" href="classawtk_1_1_t_rect.html#a2f977d55dae6bb815b6d3f1648985f30">nativeObj</a>)</td></tr>
<tr class="separator:a5baf4adf4d4d75e9b29cbe9087b333f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a261846347b61152a2c60b0ea0dd7740e"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classawtk_1_1_t_rect.html">TRect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_rect.html#a261846347b61152a2c60b0ea0dd7740e">create</a> (int x, int y, int w, int h)</td></tr>
<tr class="separator:a261846347b61152a2c60b0ea0dd7740e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba215db0cd2f0eff7d7e1d0296a46a26"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classawtk_1_1_t_rect.html">TRect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_rect.html#aba215db0cd2f0eff7d7e1d0296a46a26">cast</a> (<a class="el" href="classawtk_1_1_t_rect.html">TRect</a> rect)</td></tr>
<tr class="separator:aba215db0cd2f0eff7d7e1d0296a46a26"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:a2f977d55dae6bb815b6d3f1648985f30"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_t_rect.html#a2f977d55dae6bb815b6d3f1648985f30">nativeObj</a></td></tr>
<tr class="separator:a2f977d55dae6bb815b6d3f1648985f30"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>矩形。包括一个x坐标、y坐标、宽度和高度。 </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="a10477d0d8aefdf6d01c38317160f90c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a10477d0d8aefdf6d01c38317160f90c5">&#9670;&nbsp;</a></span>TRect()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">awtk.TRect.TRect </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>nativeObj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>通过nativeObj构造Java对象。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">nativeObj</td><td>原生对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对应的Java对象。 </dd></dl>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a5baf4adf4d4d75e9b29cbe9087b333f6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5baf4adf4d4d75e9b29cbe9087b333f6">&#9670;&nbsp;</a></span>cast() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classawtk_1_1_t_rect.html">TRect</a> awtk.TRect.cast </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>nativeObj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>把nativeObj转换层Java对象。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">nativeObj</td><td>原生对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对应的Java对象。 </dd></dl>

</div>
</div>
<a id="aba215db0cd2f0eff7d7e1d0296a46a26"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aba215db0cd2f0eff7d7e1d0296a46a26">&#9670;&nbsp;</a></span>cast() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classawtk_1_1_t_rect.html">TRect</a> awtk.TRect.cast </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classawtk_1_1_t_rect.html">TRect</a>&#160;</td>
          <td class="paramname"><em>rect</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>转换为rect对象。</p>
<blockquote class="doxtable">
<p>供脚本语言使用。 </p>
</blockquote>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">rect</td><td>rect对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>rect对象。 </dd></dl>

</div>
</div>
<a id="a261846347b61152a2c60b0ea0dd7740e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a261846347b61152a2c60b0ea0dd7740e">&#9670;&nbsp;</a></span>create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classawtk_1_1_t_rect.html">TRect</a> awtk.TRect.create </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建rect对象。</p>
<blockquote class="doxtable">
<p>主要供脚本语言使用。 </p>
</blockquote>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>x坐标。 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标。 </td></tr>
    <tr><td class="paramname">w</td><td>宽度。 </td></tr>
    <tr><td class="paramname">h</td><td>高度。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>rect对象。 </dd></dl>

</div>
</div>
<a id="a7b5f66742ee5238240be71f67db3cce8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b5f66742ee5238240be71f67db3cce8">&#9670;&nbsp;</a></span>destroy()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_t_ret.html">TRet</a> awtk.TRect.destroy </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>销毁rect对象。</p>
<blockquote class="doxtable">
<p>主要供脚本语言使用。 </p>
</blockquote>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a5c44ec80ee106bcf1bc38a9b23b35a2b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c44ec80ee106bcf1bc38a9b23b35a2b">&#9670;&nbsp;</a></span>getH()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.TRect.getH </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>高度。 </p>

</div>
</div>
<a id="ae97865527d842d6a0b7bbd64afed9cca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae97865527d842d6a0b7bbd64afed9cca">&#9670;&nbsp;</a></span>getW()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.TRect.getW </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>宽度。 </p>

</div>
</div>
<a id="aa797b41268e6a41762c89cdab0917258"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa797b41268e6a41762c89cdab0917258">&#9670;&nbsp;</a></span>getX()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.TRect.getX </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>x坐标。 </p>

</div>
</div>
<a id="ae914521d02bf4f4635bb110922b8c01c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae914521d02bf4f4635bb110922b8c01c">&#9670;&nbsp;</a></span>getY()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.TRect.getY </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>y坐标。 </p>

</div>
</div>
<a id="a0ed6e46363a1d47d4e6e43c2dc84deb6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ed6e46363a1d47d4e6e43c2dc84deb6">&#9670;&nbsp;</a></span>set()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classawtk_1_1_t_rect.html">TRect</a> awtk.TRect.set </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置rect对象的xywh。</p>
<blockquote class="doxtable">
<p>主要供脚本语言使用。 </p>
</blockquote>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>x坐标。 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标。 </td></tr>
    <tr><td class="paramname">w</td><td>宽度。 </td></tr>
    <tr><td class="paramname">h</td><td>高度。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>rect对象。 </dd></dl>

</div>
</div>
<h2 class="groupheader">类成员变量说明</h2>
<a id="a2f977d55dae6bb815b6d3f1648985f30"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2f977d55dae6bb815b6d3f1648985f30">&#9670;&nbsp;</a></span>nativeObj</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long awtk.TRect.nativeObj</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>原生对象。 </p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/TRect.java</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
